Embodiments of the present invention generally relate to database systems, more particularly, to performing a database query by using a user-defined function (UDF).
With the increase of data amounts and constant changing of users' needs, various “not only structured query language” (NoSQL) systems that are different from traditional relational database management systems (RDBMS) continuously emerge. Different from a traditional relational database that provides SQL structuralized query and guarantee of atomicity, consistency, isolation, durability (ACID), a NoSQL system does not use SQL as the query language. Its common features are non-relational data storage, simple application programming interface (API), final consistency guarantee and good horizontal scalability, which makes a NoSQL system become an ideal platform for resolving large data storage, large data query, and analysis in a cloud computing platform.
Current NoSQL systems can support a simple query to a large-scale data sheet, for example, a query based on a primary key. However, for an associated query containing one or more large-scale data sheets, NoSQL systems cannot effectively provide support. Usually applications can only realize NoSQL-based complex association support through a large amount of targeted development. This method is not flexible, has high development costs, and performance cannot be guaranteed. Based on the respective advantages of RDBMS and NoSQL, the two can be combined. Key data required for an associated query is stored in a relational database, and large scale and complete data are stored in a NoSQL system, so as to improve the associated query performance on a large scale data sheet by a mix and match approach. In currently existing possible mix and match approaches, the data interaction between RDBMS and NoSQL data sources has a performance bottleneck.